package com.cutie.core.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import com.cutie.core.dao.DatabaseConnectionPool;

public class ConfigReader {
	
	InputStream in = null;
    
    public ConfigReader(String path) throws FileNotFoundException{
    	in = DatabaseConnectionPool.class.getResourceAsStream(path);
    }
    
	public Properties readConfig() throws FileNotFoundException, IOException{
		Properties prop = new Properties();
		prop.load(in);
		return prop;
	}
		
	public void close() throws IOException{
		in.close();
	}
}
